﻿@model IEnumerable<SanQiOther.Models.dict_Dormitory>
@{
    ViewBag.Title = "宿舍信息";
    ViewBag.pageHeader = "辅助功能";
    ViewBag.pageDes = "宿舍信息";
}
@using (Html.BeginForm("Index", "Dormitory", FormMethod.Post, new { @class = "form-horizontal" }))
{
    <div class="box box-primary">
        <!-- /.box-header -->
        <div class="box-body">
            <table id="roleList" class="table table-bordered table-striped">
                <thead>
                    <tr>
                        <th>
                            @Html.DisplayNameFor(model => model.id)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.mc)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.type)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.rs)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.dqrz)
                        </th>

                        <th>
                            @Html.DisplayNameFor(model => model.bz)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.IsUsing)
                        </th>
                        <th>

                        </th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @Html.DisplayFor(modelItem => item.id)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.mc)
                            </td>
                            <td>
                                @Html.Raw(PubClass.GetSsSsType(item.type.ToString()))

                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.rs)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.dqrz)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.bz)
                            </td>
                            <td>
                                @Html.Raw(PubClass.GetSsZt(item.IsUsing.ToString()))
                            </td>
                            <td>
                                @Html.ActionLink("查看", "Detail", new { id = item.mc })
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
        <!-- /.box-body -->
    </div>
}
@section Styles {
    @Styles.Render("~/bundles/datatables")
}
@section Scripts {
    @Scripts.Render("~/bundles/datatablesjq")
    @Scripts.Render("~/bundles/datatablesbs")
    <script>
        $(function () {
            $("#roleList").DataTable(
                {
                    "columnDefs": [
                       { "targets": [0], "visible": false }
                    ],
                    "autoWidth": true,
                    "ordering": false,
                    "language": {
                        "url": "/Content/plugins/datatables/Chinese.json"
                    }
                });
        });
    </script>
}

